<ng-container *ngIf="!type">
  <input nz-input nzSize="default" [ngClass]="class" [ngStyle]="style" [placeholder]="title" [id]="iid"
    [(ngModel)]="module[data][name]" *ngIf="!inputHid" autocomplete="off" (click)="inputClick()"
    [disabled]="disabled==data+'_dis'?module[data+'_dis'][name]:module[disabled]" (mouseenter)="this[random] = true"
    (mouseleave)="this[random] = false">
  <div [id]="iid" *ngIf="!inputHid" class="inputSvg">
    <ng-container *ngIf="disabled==data+'_dis'?module[data+'_dis'][name]:module[disabled]; else notMobile">
      <app-svg [module]="this" (outer)="resetData($event)" type="2"></app-svg>
    </ng-container>
  </div>
  <div [id]="random">
    <ng-container *ngIf="!format || format==='date'">
      <nz-date-picker [nzPlaceHolder]="title" [(ngModel)]="dateValue" *ngIf="inputHid" [ngClass]="class"
        [ngStyle]="style" [id]="iid" (ngModelChange)="DateClick()" (nzOpenChange)="openDataClick($event);this[random]=false" [nzDisabledDate]="disabledDate"
        [nzDisabled]="disabled==data+'_dis'?module[data+'_dis'][name]:module[disabled]"></nz-date-picker>
    </ng-container>
    <ng-container *ngIf="format==='year'">
      <nz-year-picker [nzPlaceHolder]="title" [(ngModel)]="dateValue" *ngIf="inputHid" [ngClass]="class"
        [ngStyle]="style" [id]="iid" (ngModelChange)="DateClick()" (nzOnOpenChange)="openDataClick($event);this[random]=false" [nzDisabledDate]="disabledDate"
        [nzDisabled]="disabled==data+'_dis'?module[data+'_dis'][name]:module[disabled]"></nz-year-picker>
    </ng-container>
    <ng-container *ngIf="format==='month'">
      <nz-month-picker [nzPlaceHolder]="title" [(ngModel)]="dateValue" *ngIf="inputHid" [ngClass]="class"
        [ngStyle]="style" [id]="iid" (ngModelChange)="DateClick()" (nzOnOpenChange)="openDataClick($event);this[random]=false" [nzDisabledDate]="disabledDate"
        [nzDisabled]="disabled==data+'_dis'?module[data+'_dis'][name]:module[disabled]"></nz-month-picker>
    </ng-container>
    <ng-container *ngIf="format==='datetime'">
      <nz-date-picker [nzPlaceHolder]="title" [(ngModel)]="dateValue" *ngIf="inputHid" [ngClass]="class"
        [ngStyle]="style" [id]="iid" (ngModelChange)="DateClick()" (nzOnOpenChange)="openDataClick($event);this[random]=false" [nzDisabledDate]="disabledDate" nzShowTime
        [nzDisabled]="disabled==data+'_dis'?module[data+'_dis'][name]:module[disabled]"></nz-date-picker>
    </ng-container>
  </div>
</ng-container>

<ng-template #notMobile>
  <app-svg [module]="this" (outer)="resetData($event)" type="1"></app-svg>
 </ng-template>
 
<ng-container *ngIf="type==='search'">
  <input nz-input nzSize="default" [ngClass]="class" [ngStyle]="style" [placeholder]="title" [id]="iid"
    [(ngModel)]="module[data][name]" *ngIf="!inputHid" autocomplete="off" (click)="inputClick()" (mouseenter)="this[random] = true"
    (mouseleave)="this[random] = false">
  <div [id]="iid" *ngIf="!inputHid" class="inputSvg2">
    <app-svg [module]="this" (outer)="resetData($event)" type="1"></app-svg> 
  </div>
  <div [id]="random">
    <ng-container *ngIf="!format || format==='date'">
      <nz-date-picker [nzPlaceHolder]="title" [(ngModel)]="dateValue" *ngIf="inputHid" [ngClass]="class"
        [ngStyle]="style" [id]="iid" (ngModelChange)="DateClick()" (nzOnOpenChange)="openDataClick($event);this[random]=false" [nzDisabledDate]="disabledDate"></nz-date-picker>
    </ng-container>
    <ng-container *ngIf="format==='year'">
      <nz-year-picker [nzPlaceHolder]="title" [(ngModel)]="dateValue" *ngIf="inputHid" [ngClass]="class"
        [ngStyle]="style" [id]="iid" (ngModelChange)="DateClick()" (nzOnOpenChange)="openDataClick($event);this[random]=false" [nzDisabledDate]="disabledDate"></nz-year-picker>
    </ng-container>
    <ng-container *ngIf="format==='month'">
      <nz-month-picker [nzPlaceHolder]="title" [(ngModel)]="dateValue" *ngIf="inputHid" [ngClass]="class"
        [ngStyle]="style" [id]="iid" (ngModelChange)="DateClick()" (nzOnOpenChange)="openDataClick($event);this[random]=false" [nzDisabledDate]="disabledDate"></nz-month-picker>
    </ng-container>
    <ng-container *ngIf="format==='datetime'">
      <nz-date-picker [nzPlaceHolder]="title" [(ngModel)]="dateValue" *ngIf="inputHid" [ngClass]="class"
        [ngStyle]="style" [id]="iid" (ngModelChange)="DateClick()" (nzOnOpenChange)="openDataClick($event);this[random]=false" [nzDisabledDate]="disabledDate" nzShowTime></nz-date-picker>
    </ng-container>
  </div>
</ng-container>


<!-- <ng-container *ngIf="type==='search'">
  <input nz-input nzSize="default" autocomplete="off" [ngClass]="class" [ngStyle]="style" [placeholder]="title" [(ngModel)]="module[data][name]"
    *ngIf="!inputHid" (click)="inputLayClick()" style="border: 1px solid red;">
  <input nz-input nzSize="default" autocomplete="off" [ngClass]="class" [ngStyle]="style" [placeholder]="title" [(ngModel)]="module[data][name]"
    *ngIf="inputHid" [id]="iid" (blur)="DateLayClick()">
</ng-container> -->


<!-- 

  表单区域：
  <app-cp-date [module]="this" data="data1" name="startDate"></app-cp-date> 

  搜索区域：
  <app-cp-date [module]="this" data="searchData" name="startDate" title="单据日期>=" type="search"></app-cp-date> 

  通用date自定义拓展用法（参数选填）：
  <app-cp-date [module]="this" data="data1" name="licType" (outer)="demo($event)" class="aaa bbb" css="float:left;width: 200px;" iid="aaa" title="默认提示文字"
   disabled="isCourse0"  type="search" format="year" minData="2020-12-01" maxData="2020-12-12"></app-cp-date>

  (outer)="demo($event)"          date控件选择触发事件
  class="aaa bbb"                 input及date控件自定义class样式
  css="float:left;width: 200px;"  input及date控件自定义内联样式，等同于style="float:left;width: 200px;"
  iid="aaa"                       input及date控件自定义id名称
  title="默认提示文字              input及date控件默认提示文字
  disabled="isCourse0"            input及date控件禁用属性自定义名称
  type="search"                   date控件类型，示例为表格“功能”类型:search搜索区域
  format="year"                   date控件格式：year(年)、month(年-月)、datetime(年-月-日 时:分:秒)、date(年-月-日，默认值，可不传)
  minData="2020-12-01"            可选最小日期（等于或大于2020-12-01可选）
  maxData="2020-12-12"            可选最大日期（小于2020-12-12可选）


-->